<template>
  <footer>
    <!-- 主要页脚内容 -->
    <div class="main-footer">
      <div class="container">
        <div class="row">
          <!-- 网站信息 -->
          <div class="col-lg-4 col-md-6 mb-4">
            <div class="footer-section">
              <h5 class="footer-title">{{ siteName }}</h5>
              <p class="footer-desc">
                我们是一家流浪动物救助平台，目的是为了使更多流浪的小动物感受到爱和温暖。
                我们的宗旨是让每一只流浪动物都能得到救助。
              </p>
              <div class="contact-info">
                <div class="contact-item">
                  <i class="contact-icon">📍</i>
                  <span>{{ siteInfo.address }}</span>
                </div>
                <div class="contact-item">
                  <i class="contact-icon">📞</i>
                  <span>{{ siteInfo.phone }}</span>
                </div>
                <div class="contact-item">
                  <i class="contact-icon">✉️</i>
                  <span>{{ siteInfo.email }}</span>
                </div>
              </div>
            </div>
          </div>
          
          <!-- 快速导航 -->
          <div class="col-lg-2 col-md-3 col-sm-6 mb-4">
            <div class="footer-section">
              <h5 class="footer-title">救助服务</h5>
              <ul class="footer-links">
                <li><a href="#" class="footer-link">犬类救助</a></li>
                <li><a href="#" class="footer-link">猫类救助</a></li>
                <li><a href="#" class="footer-link">其他动物</a></li>
                <li><a href="#" class="footer-link">紧急救助</a></li>
              </ul>
            </div>
          </div>
          
          <div class="col-lg-2 col-md-3 col-sm-6 mb-4">
            <div class="footer-section">
              <h5 class="footer-title">领养服务</h5>
              <ul class="footer-links">
                <li><a href="#" class="footer-link">领养流程</a></li>
                <li><a href="#" class="footer-link">领养案例</a></li>
                <li><a href="#" class="footer-link">领养须知</a></li>
                <li><a href="#" class="footer-link">后期回访</a></li>
              </ul>
            </div>
          </div>
          
          <!-- 联系我们 -->
          <div class="col-lg-4 col-md-12 mb-4">
            <div class="footer-section">
              <h5 class="footer-title">关注我们</h5>
              <p class="mb-3">获取最新救助动态和领养信息</p>
              
              <!-- 社交媒体 -->
              <div class="social-links mb-3">
                <a href="#" class="social-link" title="微信">
                  <i class="social-icon">💬</i>
                </a>
                <a href="#" class="social-link" title="微博">
                  <i class="social-icon">📱</i>
                </a>
                <a href="#" class="social-link" title="QQ群">
                  <i class="social-icon">👥</i>
                </a>
              </div>
              
              <!-- 工作时间 -->
              <div class="working-hours">
                <h6 class="hours-title">服务时间</h6>
                <p class="hours-text">周一至周日：9:00 - 18:00</p>
                <p class="hours-text">紧急救助：24小时热线</p>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- 版权信息 -->
    <div class="copyright">
      <div class="container">
        <div class="row align-items-center">
          <div class="col-md-8">
            <p class="copyright-text">
              © 2025 {{ siteName }} - 专注流浪动物救助 | 
            </p>
          </div>
          <div class="col-md-4 text-md-end">
            <div class="footer-links-inline">
              <a href="#" class="copyright-link">隐私政策</a>
              <a href="#" class="copyright-link">使用条款</a>
              <a href="#" class="copyright-link">网站地图</a>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- 返回顶部按钮 -->
    <button 
      class="back-to-top" 
      @click="scrollToTop"
      title="返回顶部"
    >
      <i class="top-icon">⬆️</i>
    </button>

    <!-- 移动端底部导航 -->
    <nav class="mobile-bottom-nav d-md-none">
      <div class="mobile-nav-item">
        <router-link to="/" class="nav-link">
          <i class="nav-icon">🏠</i>
          <span class="nav-text">首页</span>
        </router-link>
      </div>
      <div class="mobile-nav-item">
        <a href="#" class="nav-link">
          <i class="nav-icon">📞</i>
          <span class="nav-text">电话</span>
        </a>
      </div>
      <div class="mobile-nav-item">
        <a href="#" class="nav-link">
          <i class="nav-icon">📋</i>
          <span class="nav-text">服务</span>
        </a>
      </div>
      <div class="mobile-nav-item">
        <a href="#" @click="scrollToTop" class="nav-link">
          <i class="nav-icon">⬆️</i>
          <span class="nav-text">顶部</span>
        </a>
      </div>
    </nav>
  </footer>
</template>

<script>
export default {
  name: 'AppFooter',
  data() {
    return {
      siteName: '流浪动物之家',
      siteInfo: {
        address: '翻斗大街翻斗花园2号楼1001室',
        phone: '400-123-4567', 
        email: '495102569@qq.com'
      }
    }
  },
  methods: {
    scrollToTop() {
      window.scrollTo({
        top: 0,
        behavior: 'smooth'
      })
    }
  }
}
</script>

<style scoped>
footer {
  margin-top: 60px;
}

/* 主要页脚样式 */
.main-footer {
  background: linear-gradient(135deg, #f8fffe 0%, #e8f5f3 100%);
  padding: 50px 0 30px;
  position: relative;
}

.main-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #04A07B 0%, #06c195 50%, #04A07B 100%);
}

.footer-section {
  height: 100%;
}

.footer-title {
  color: #04A07B;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: #04A07B;
  border-radius: 1px;
}

.footer-desc {
  color: #666;
  line-height: 1.7;
  margin-bottom: 25px;
  font-size: 14px;
}

/* 联系信息 */
.contact-info {
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateX(5px);
  color: #04A07B;
}

.contact-icon {
  font-size: 16px;
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.contact-item span {
  color: #555;
  font-size: 14px;
}

/* 导航链接 */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-link {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 15px;
}

.footer-link::before {
  content: '›';
  position: absolute;
  left: 0;
  color: #04A07B;
  font-weight: bold;
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: #04A07B;
  padding-left: 20px;
  text-decoration: none;
}

.footer-link:hover::before {
  transform: translateX(3px);
}

/* 社交链接 */
.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: white;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(4, 160, 123, 0.1);
  border-radius: 50%;
  transition: all 0.4s ease;
  transform: translate(-50%, -50%);
}

.social-link:hover::before {
  width: 100%;
  height: 100%;
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(4, 160, 123, 0.3);
}

.social-icon {
  font-size: 20px;
  position: relative;
  z-index: 2;
}

/* 工作时间 */
.working-hours {
  background: white;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #04A07B;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.working-hours:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.hours-title {
  color: #04A07B;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.hours-text {
  color: #666;
  font-size: 14px;
  margin-bottom: 5px;
}

.hours-text:last-child {
  margin-bottom: 0;
}

/* 版权信息 */
.copyright {
  background: #2c3e50;
  padding: 25px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.copyright-text {
  color: #bdc3c7;
  margin: 0;
  font-size: 14px;
}

.copyright-link {
  color: #ecf0f1;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.copyright-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #04A07B;
  transition: width 0.3s ease;
}

.copyright-link:hover {
  color: #04A07B;
  text-decoration: none;
}

.copyright-link:hover::after {
  width: 100%;
}

.footer-links-inline {
  display: flex;
  gap: 20px;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 50px;
  height: 50px;
  background: #04A07B;
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(4, 160, 123, 0.3);
}

.back-to-top:hover {
  background: #038066;
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(4, 160, 123, 0.4);
}

.top-icon {
  font-size: 18px;
}

/* 移动端底部导航 */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid #e0e0e0;
  display: flex;
  z-index: 1000;
  padding: 0;
}

.mobile-nav-item {
  flex: 1;
  text-align: center;
}

.mobile-nav-item .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 5px;
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.mobile-nav-item .nav-link:hover {
  color: #04A07B;
  background: rgba(4, 160, 123, 0.1);
  text-decoration: none;
}

.nav-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.nav-text {
  font-size: 12px;
  font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .main-footer {
    padding: 40px 0 25px;
  }
  
  .footer-title {
    font-size: 16px;
  }
  
  .footer-desc {
    font-size: 13px;
  }
  
  .social-links {
    justify-content: center;
    gap: 12px;
  }
  
  .social-link {
    width: 40px;
    height: 40px;
  }
  
  .social-icon {
    font-size: 18px;
  }
  
  .working-hours {
    padding: 15px;
  }
  
  .back-to-top {
    right: 20px;
    bottom: 80px;
    width: 45px;
    height: 45px;
  }
  
  .top-icon {
    font-size: 16px;
  }
  
  .footer-links-inline {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .copyright {
    padding: 20px 0;
  }
  
  .copyright-text {
    text-align: center;
    margin-bottom: 10px;
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer-section {
  animation: fadeInUp 0.6s ease-out;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }
</style>
